package com.example.travel.controller;

import com.example.travel.entity.Festival;
import com.example.travel.entity.User;
import com.example.travel.entity.dto.*;
import com.example.travel.service.IAdminDeleteService;
import com.example.travel.service.IAdminSelectService;
import com.example.travel.util.ResultUtil;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/AdminDeleteController")
public class AdminDeleteController {

    @Autowired
    private IAdminDeleteService adminDeleteService;

    /**
     * 管理员删除用户
     * @param user
     * @return
     */
    @DeleteMapping("/delUserData")
    public boolean delUserData(User user){
        return adminDeleteService.delUserData(user);
    }

    /**
     * 删除酒店信息
     * @param hotelDTO
     * @return
     */
    @DeleteMapping("/delHotelInformation")
    public boolean delHotelInformation(HotelDTO hotelDTO){
        return adminDeleteService.delHotelInformation(hotelDTO);
    }

    /**
     * 删除景点信息
     * @param scenicDTO
     * @return
     */
    @DeleteMapping("/delScenicInformation")
    public boolean delScenicInformation(ScenicDTO scenicDTO){
        return adminDeleteService.delScenicInformation(scenicDTO);
    }


    /**
     * 删除节日信息
     * @param festivalDTO
     * @return
     */
    @DeleteMapping("/delFestivalInformation")
    public boolean delFestivalInformation(FestivalDTO festivalDTO){
        return adminDeleteService.delFestivalInformation(festivalDTO);
    }


    @DeleteMapping("/delLeaveInformation")
    public boolean delLeaveInformation(LeaveDTO leaveDTO){
        return adminDeleteService.delLeaveInformation(leaveDTO);
    }

    /**
     * 删除景点轮播图
     * @return
     */
    @DeleteMapping("/delScenicBannerImg")
    public boolean delScenicBannerImg(ScenicImgDTO scenicImgDTO){
        return adminDeleteService.delScenicBannerImg(scenicImgDTO);
    }
}
